import http from '@/utils/http'
// 获取课程详情数据(主要用于获取专业会员的购买)
export function getCourseDetail(params) {
  return http.get('/app/iap/course_videov2', params)
}
// 获取当前订单号
export function getCurOrder(params) {
  return http.get('/wxpub/api/order', params)
}
// 微信支付
export function postWxPay(params) {
  return http.post(
    '/wxpub/shopCoupons/jsapi_order?from=web&channel=web&devtype=web&platform_type=web',
    params
  )
}
// 支付宝支付
export function postAliPay(params) {
  return http.post('/wxpub/pay/alipay_pc', params)
}
// 预订单页面获取商品是否支持花呗分期
export function isHanaPay(params) {
  return http.post('/wxpub/shop/installment_params_init', params)
}
// 激活码激活
export function postCodePay(params) {
  return http.post('/wxpub/api/code', params)
}
// 激活课程
export function postAcCourse(params) {
  return http.post('/wxpub/api/activation', params)
}
// 验证订单状态
export function getOrderStatus(params) {
  return http.get('/wxpub/shop/order_status', params)
}
// 编辑地址
export function putAddress(params) {
  return http.post('/wxpub/api/user_address_put', params)
}
// 查看订单信息
export function postOrderMsg(params) {
  return http.post('/wxpub/shop/pre_orderv2', params)
}
// 生成订单
export function postCreateOrder(params) {
  return http.post(
    '/wxpub/shop/create_orderv2?from=web&channel=web&devtype=web&platform_type=web',
    params
  )
}
//新增邮寄地址
export function postAddress(params) {
  return http.post('/wxpub/api/user_address', params)
}
//获取邮寄地址
export function getAddress(params) {
  return http.get('/wxpub/api/user_address', params)
}
// 删除地址
export function delAddress(params) {
  return http.post('/wxpub/api/user_address_delete', params)
}
// 商品购课须知信息
export function goodsNoticeDetail(params) {
  return http.get('/app/iap/goods_notice_detail', params)
}
